<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>BOS管理系统首页</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<script src="../js/ztree/jquery.ztree.all-3.5.js" type="text/javascript" charset="utf-8"></script>
		<link rel="stylesheet" type="text/css" href="../js/ztree/zTreeStyle.css" />

		<script type="text/javascript">
			$(function() {
				$.extend($.fn.validatebox.defaults.rules, {
					minLength: {
						validator: function(value, param) {
							return value.length >= param[0] && value.length <=param[1];
						},
						message: '请输入 {0}-{1} 个字符.'
					}
				});

				$("#submitBtn").click(function() {
					if($("#myform").form('validate')) {
						$("#myform").submit();
					} else {
						$.messager.alert('警告', '数据不符合格式要求!', 'warning');
					}
				});
			});
		</script>
	</head>

	<body>
		<input type="button" value="提交" class="easyui-linkbutton" id="submitBtn" />
		<form id="myform" name="myform" action="http://www.baidu.com">
			自定义校验:<input  type="text" name="name" class="easyui-validatebox" data-options="validType:'minLength[5,8]'">
		</form>
	</body>

</html>